/**
 * 
 */
package pl.kkalisz.android.model.item.modules;

import pl.kkalisz.android.model.item.interfaces.uAction;

/**
 * @author kkalisz
 *
 */
public class uActionModule {
    
    uAction mAction = null;
    
    /**
     * @return true if action was set and invoked, false othervise
     */
    
    public boolean invokeAction()
    {
        if(mAction == null) return false;
        else return mAction.invoke();
    }
    
    /**
     * @param aAction - set this action as clicked action
     */
    public void setAction( uAction aAction)
    {
        mAction = aAction;
    }
    
    public void removeAction()
    {
        mAction = null;
    }

}
